home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cool / cool.lha / ice / cpp / tests / generate.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-09-04  |  612 b   |  25 lines

  1. //
  2. // Copyright (C) 1991 Texas Instruments Incorporated.
  3. //
  4. // Permission is granted to any individual or institution to use, copy, modify,
  5. // and distribute this software, provided that this complete copyright and
  6. // permission notice is maintained, intact, in all copies and supporting
  7. // documentation.
  8. //
  9. // Texas Instruments Incorporated provides this software "as is" without
  10. // express or implied warranty.
  11. //
  12.  
  13. #pragma defmacro GENERATE generate delimiter=}
  14. #pragma defmacro MACRO macro delimiter=}
  15.  
  16. MACRO ODD (REST: ints) {
  17.   GENERATE (x, ints) {
  18.     #if x&1
  19.         x
  20.     #endif
  21.   }
  22. }
  23.  
  24. ODD(1,2,3,4,5,6)
  25.